#region Copyright Notice
// 
// 
// Copyright (c) 2009-2010 Anindya Chatterjee
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 
// 
// 
#endregion
namespace System.Serialization
{
    /// <summary>
    /// IBObject interface. Any class needs to extend it to be binary serializable
    /// </summary>
    /// <example>
    /// <code>
    /// using System.Serialization;
    /// using System.Xml.Serialization;
    /// using System;
    /// using System.Collections.Generic;
    /// 
    /// namespace Demo
    /// {
    ///    public class ConfigDemo : IBObject
    ///    {
    ///            
    ///        public string TestValue { get; set; }
    ///
    ///        public List&lt;String&gt; TestList { get; set; }
    ///
    ///        public DateTime LoadTime { get; set; }
    ///
    ///        public DateTime SaveTime { get; set; }
    ///
    ///        public void Init()
    ///        {
    ///            LoadTime = DateTime.Now;
    ///        }
    ///
    ///        void IBObject.Close()
    ///        {
    ///            
    ///        }
    ///    }
    /// }
    /// 
    /// </code> 
    /// </example>
    public interface IBObject
    {
        /// <summary>
        /// Executes routines just after deserialization
        /// </summary>
        /// <remarks>
        /// Implements this method explicitly if you don't want to use it in the class
        /// </remarks>
        void Init();

        /// <summary>
        /// Executes routines just before serialization
        /// </summary>
        /// <remarks>
        /// Implements this explicitly if you don't want to use in the class
        /// </remarks>
        void Close();
    }
}